SEO - Google and link cleaning / cloaking [closed]
Posted
by
Jens Törnell
on Pro Webmasters
See other posts from Pro Webmasters
or by Jens Törnell
Published on 2012-11-29T12:36:33Z
Indexed on
2012/11/29
17:19 UTC
Read the original article
Hit count: 493
Possible Duplicate:
Does the Google spider render JavaScript?
This a SEO related question, not a code related one.
Googles own link cleaning / cloaking
Gå to http://www.google.com and search for something.
- Hover the title and you will se a link to the page you want to go to.
- The URL you see when hovering is NOT the link you are clicking on.
- Instead of clicking you can drag the title a little bit and then hover it. Then you will se the real URL.
My own link cleaning / cloaking
- Go to http://jsfiddle.net/NvmER/1/ and click the link, or look at the code below.
- You will be "redirected" to http://www.test.com.
- The real link are http://www.test.com/?event=23
Working code in case jsfiddle don't work
If you need to se how it works I pasted a code below.
<a class="direct" href="http://www.test.com/?event=23" data-redirect="http://www.test.com">Länk</a>?
$(document).ready(function() {
$("a.direct").live("mousedown", function(e){
var oldurl = $(this).attr('href');
var newurl = $(this).attr('data-redirect');
$(this).attr('href', newurl);
});
});?
Question
Is this ok with Google? It's done with javascript.
If you have an answer, link to a source or test to support it.
© Pro Webmasters or respective owner